<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('store/index',array('type'=>$type))}">进出库管理</a></li>
		</ul>
         <div>
       	<form  class="well form-search" action="{:url('store/index',array('type'=>$type))}" method="get">
        <label>{:lang('GOODS_NAME')}: 
        <input  type="text" class="form-control" name="goods_name" placeholder="请输入商品名称"value="{:input('request.goods_name')}" > </label>
			<label>{:lang('库房')}:
				<select class="form-control" name="room">
					<option value="">——请选择——</option>
					<volist name="rooms" id="vo">
						<option value="{$vo.id}" <if condition="$room eq $vo.id">selected</if>>{$vo.room_name}</option>
					</volist>
				</select></label>
			<input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('store/index',array('type'=>$type))}">清空</a>
        </form>
        </div>
		<form action="{:url('Rbac/listorders')}" method="post">
			<table class="table table-hover table-bordered">
				<thead>
				<tr>
					<th width="3%">ID</th>
					<th width="15%">{:lang('GOODS_NAME')}</th>
					<th width="10%">{:lang('GOODS_CATE')}</th>
					<th width="10%">{:lang('PRICE')}</th>
					<th width="10%">{:lang('SUPPLIER')}</th>
					<th width="12%">{:lang('STOCK')}</th>
					<th width="10%">{:lang('STOREROOM')}</th>
					<th width="15%">{:lang('ADD_TIME')}</th>
					<th width="15%">{:lang('ACTIONS')}</th>
				</tr>
				</thead>
				<tbody>
				<foreach name="results" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.goods_name}</td>
						<td>{$vo['cate_name']}</td>
						<td>{$vo['price']}</td>
						<td>{$vo['service']}</td>
						<td>{$vo['stock']}</td>
						<td>{$vo['room_name']}</td>
						<td><php>echo date('Y-m-d H:i:s', $vo['add_time'])</php></td>
						<td>
							<a href="javascript:openIframeDialog('{:url('Admin/Store/outGoods',array('type'=>$type,'from'=>'out','id'=>$vo['id']))}','出库',{width:'600px',height:'400px'}, '600px', '450px')">出库</a>
							<a href="javascript:openIframeDialog('{:url('Admin/Store/outGoods',array('type'=>$type,'from'=>'add','id'=>$vo['id']))}','补货',{width:'600px',height:'400px'}, '600px', '450px')">补货</a>
						</td>
					</tr>
				</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>

	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
    <script type="text/javascript">
		</script>
</body>
</html>